package picobot.tests;

import picobot.interfaces.core.IFactory;

public class Bootstrap {
  private static IFactory _INSTANCE = null;
  public synchronized static IFactory  f() {
    try {
    if (_INSTANCE == null ) {
         String factoryClass = System.getProperty("factory");
        _INSTANCE = ((IFactory)Class.forName(factoryClass).newInstance());
    }
    return _INSTANCE;
    } catch (Exception e) {
      throw new RuntimeException(e);
    }  
  }
}
